// 获取用户信息的store
import { makeAutoObservable } from 'mobx'
import { getUserInfoAPI } from '../api'

class UserStore {
  userInfo = {}
  constructor() {
    makeAutoObservable(this)
  }
  // 获取用户信息
  loadUserInfo = async () => {
    const { data: res } = await getUserInfoAPI()
    console.log('store中的用户信息', res.body)
    this.userInfo = res.body
  }
}

export default UserStore
